<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8" />
    <title>vue</title>
</head>

<body>
    <div id="app">
        <div><a href="#" v-on:click="load">显示数据</a></div>
        <template v-if="loaded">
            <ul>
                <li v-for="item in language">{{item.name}}</li>
            </ul>
        </template>
    </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            loaded: false,
            language: [{
                    name: 'c',
                    desc: 'c语言'
                },
                {
                    name: 'python',
                    desc: '爬虫语言'
                },
                {
                    name: 'java',
                    desc: '企业应用语言'
                }
            ]
        },
        methods: {
            load: function() {
                this.loaded = true;
            }
        }
    });
</script>

</html>